2 Dimensional Vector Class
Methods
Alias for {@link vec2.subtract}
Alias for {@link vec2.multiply}
Alias for {@link vec2.divide}
Alias for {@link vec2.distance}
Alias for {@link vec2.squaredDistance}
Alias for {@link vec2.length}
Alias for {@link vec2.squaredLength}
(
Array
-
a
-
stride
-
offset
-
count
-
fn
-
[arg]
Perform some operation over an array of vec2s.
Parameters:
-
a
Arraythe array of vectors to iterate over
-
stride
NumberNumber of elements between the start of each vec2. If 0 assumes tightly packed
-
offset
NumberNumber of elements to skip at the beginning of the array
-
count
NumberNumber of vec2s to iterate over. If 0 iterates over entire array
-
fn
FunctionFunction to call for each vector in the array
-
[arg]
Object optionaladditional argument to pass to fn
Returns:
Array:
a